home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / BBS_UTL / EXDOOR / TTT.PAS < prev   
Pascal/Delphi Source File  |  1994-07-05  |  1KB  |  63 lines

  1. {******************************************************}
  2. {*                     TTT.PAS 2.01                   *}
  3. {*      Copyright (c) TurboPower Software 1993.       *}
  4. {*                All rights reserved.                *}
  5. {******************************************************}
  6.  
  7. {$I APDEFINE.INC}
  8.  
  9. {$IFNDEF UseUart}
  10.   !! Error - The settings in APDEFINE.INC are not compatible with this program
  11. {$ENDIF}
  12.  
  13. {$IFNDEF UseOOP}
  14.   !! Error - You must use the object-oriented interface for this program
  15. {$ENDIF}
  16.  
  17. {$S-,R-,V-,I-,B-,F+,O+,A-,X+}
  18.  
  19. program TicTacToe;
  20. uses
  21.   {$IFDEF UseOpro}
  22.   OpCrt,
  23.   OpDos,
  24.   {$ENDIF}
  25.   {$IFDEF UseTpro}
  26.   TpCrt,
  27.   TpDos,
  28.   {$ENDIF}
  29.   {$IFDEF Standalone}
  30.   Crt,
  31.   {$ENDIF}
  32.   ApPort,
  33.   ApMisc,
  34.   ApAnsi,
  35.   DoorIO,
  36.   Game;
  37.  
  38. begin
  39.   if (ParamCount <> 1) then begin
  40.     WriteLn('Usage  : TTT <fully qualified path to DOOR.SYS file>');
  41.     WriteLn;
  42.     WriteLn('Example: TTT C:\BBS\DOOR.SYS');
  43.     Halt(1);
  44.   end;
  45.  
  46.   if not ExistFile(ParamStr(1)) then begin
  47.     WriteLn('File does not exist: ', ParamStr(1));
  48.     Halt(1);
  49.   end;
  50.  
  51.   if not ReadDoorSys(ParamStr(1)) then begin
  52.     if (AsyncStatus <> ecOK) and (AsyncStatus <> ecAnsiRequired) then
  53.       WriteLn('Can''t initialize door: ', AsyncStatus);
  54.     Halt(1);
  55.   end;
  56.  
  57.   DoorClrScr;
  58.   DisplayTextFile('SIGNON', True);
  59.   DoorGetChar;
  60.   PlayGame;
  61.   DoorShutDown;
  62. end.
  63.